package com.qf.service.impl;
import com.qf.dao.UserDao;
import com.qf.pojo.User;
import com.qf.service.UserService;

import java.util.List;

/*
 *@Description:
 *@author:刘哥
 *@Date:9:53 2022/7/8
 */
public class UserServiceImpl implements UserService {

    private UserDao userDao;

    public void setUserDao(UserDao userDao){
        this.userDao=userDao;
    }

    @Override
    public List<User> findAll() {
        return userDao.selectAll();
    }

    @Override
    public void remove(int id) {
        userDao.delete(id);
    }

    @Override
    public void modify(User user) {
        userDao.update(user);
    }

    @Override
    public void add(User user) {
        userDao.insert(user);
    }

}
